#include <bits/stdc++.h>

using namespace std;
string X, Y;

int main(){
    if (fopen("demxau.inp", "r"))
    {
        freopen("demxau.inp", "r", stdin);
        freopen("demxau.out", "w", stdout);
    }
    cin>>X>>Y;
    int nX = X.size(), nY = Y.size();
    int cnt = 0;
    for(int i=0; i<=nY-3; i++){
        string sub = Y.substr(i, nX);
        if(X==sub)cnt++;
    }
    cout<<cnt<<endl;
    return 0;
}

/*
abc
abcdddddmnabckslkjjabc
*/
